package entity

import (
	"chazhou/pkg/model/entity"
	"time"
)

// DO: DataObject 数据对象

type User struct {
	Id       uint64     `gorm:"type:bigint unsigned;primary_key;comment:主键"`
	Name     string     `gorm:"column:name;type:varchar(30);comment:用户名"`
	Account  string     `gorm:"column:account;index:idx_account;type:varchar(30);not null;unique;comment:账号"`
	Mobile   string     `gorm:"column:mobile;index:idx_mobile;type:varchar(11);unique;comment:手机号"`
	Password string     `gorm:"column:password;type:varchar(200);not null;comment:密码"`
	Birthday *time.Time `gorm:"column:birthday;type:date;comment:出生日期"`
	Sex      string     `gorm:"column:sex;type:varchar(10);default:'';comment:male:男,female:女"`
	Avatar   string     `gorm:"column:avatar;type:varchar(100);default:'';comment:头像"`
	State    string     `gorm:"column:state;type:varchar(10);default:'';comment:enable:启用,disabled:禁用"`
	entity.Entity
}
